home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1997 / MacHack 1997.toast / Hacks / Hacks ’96 / VideoFolder 1.0a / Source / MoreFiles 1.4.1 / Sharing.h < prev    next >
Text File  |  1995-12-21  |  4KB  |  111 lines

  1. /*
  2. **    Apple Macintosh Developer Technical Support
  3. **
  4. **    PBShare, PBUnshare, and PBGetUGEnty (should be in Files.h -
  5. **    if not, include this file.)
  6. **
  7. **    by Jim Luther, Apple Developer Technical Support Emeritus
  8. **
  9. **    File:        Sharing.h
  10. **
  11. **    Copyright © 1992-1995 Apple Computer, Inc.
  12. **    All rights reserved.
  13. **
  14. **    You may incorporate this sample code into your applications without
  15. **    restriction, though the sample code has been provided "AS IS" and the
  16. **    responsibility for its operation is 100% yours.  However, what you are
  17. **    not permitted to do is to redistribute the source as "DSC Sample Code"
  18. **    after having made changes. If you're going to re-distribute the source,
  19. **    we require that you make it clear in the source that the code was
  20. **    descended from Apple Sample Code, but that you've made changes.
  21. */
  22.  
  23. #ifndef __SHARING__
  24. #define __SHARING__
  25.  
  26. #ifdef __cplusplus
  27. extern "C" {
  28. #endif
  29.  
  30. #if PRAGMA_ALIGN_SUPPORTED
  31. #pragma options align=mac68k
  32. #endif
  33.  
  34. pascal OSErr PBShare(HParmBlkPtr paramBlock,
  35.                      Boolean async) = {
  36.                                 0x101F,        /* MOVE.B     (A7)+,D0   */
  37.                                 0x205F,        /* MOVEA.L    (A7)+,A0   */
  38.                                 0x6606,        /* BNE.S      *+$0008    */
  39.                                 0x7042,        /* MOVEQ      #$42,D0    */
  40.                                 0xA260,        /* _FSDispatch,Immed     */
  41.                                 0x6004,        /* BRA.S      *+$0006    */
  42.                                 0x7042,        /* MOVEQ      #$42,D0    */
  43.                                 0xA660,        /* _FSDispatch,Sys,Immed */
  44.                                 0x3E80};    /* MOVE.W     D0,(A7)    */
  45.  
  46. #pragma parameter __D0 PBShareSync(__A0)
  47. pascal OSErr PBShareSync(HParmBlkPtr paramBlock) = {
  48.                                 0x7042,        /* MOVEQ      #$42,D0    */
  49.                                 0xA260};    /* _FSDispatch,Immed     */
  50.  
  51. #pragma parameter __D0 PBShareAsync(__A0)
  52. pascal OSErr PBShareAsync(HParmBlkPtr paramBlock) = {
  53.                                 0x7042,        /* MOVEQ      #$42,D0    */
  54.                                 0xA660};    /* _FSDispatch,Sys,Immed */
  55.  
  56.  
  57. pascal OSErr PBUnshare(HParmBlkPtr paramBlock,
  58.                        Boolean async) = {
  59.                                 0x101F,        /* MOVE.B     (A7)+,D0   */
  60.                                 0x205F,        /* MOVEA.L    (A7)+,A0   */
  61.                                 0x6606,        /* BNE.S      *+$0008    */
  62.                                 0x7043,        /* MOVEQ      #$43,D0    */
  63.                                 0xA260,        /* _FSDispatch,Immed     */
  64.                                 0x6004,        /* BRA.S      *+$0006    */
  65.                                 0x7043,        /* MOVEQ      #$43,D0    */
  66.                                 0xA660,        /* _FSDispatch,Sys,Immed */
  67.                                 0x3E80};    /* MOVE.W     D0,(A7)    */
  68.  
  69. #pragma parameter __D0 PBUnshareSync(__A0)
  70. pascal OSErr PBUnshareSync(HParmBlkPtr paramBlock) = {
  71.                                 0x7043,        /* MOVEQ      #$43,D0    */
  72.                                 0xA260};    /* _FSDispatch,Immed     */
  73.  
  74. #pragma parameter __D0 PBUnshareAsync(__A0)
  75. pascal OSErr PBUnshareAsync(HParmBlkPtr paramBlock) = {
  76.                                 0x7043,        /* MOVEQ      #$43,D0    */
  77.                                 0xA660};    /* _FSDispatch,Sys,Immed */
  78.  
  79.  
  80. pascal OSErr PBGetUGEntry(HParmBlkPtr paramBlock,
  81.                           Boolean async) = {
  82.                                 0x101F,        /* MOVE.B     (A7)+,D0   */
  83.                                 0x205F,        /* MOVEA.L    (A7)+,A0   */
  84.                                 0x6606,        /* BNE.S      *+$0008    */
  85.                                 0x7044,        /* MOVEQ      #$44,D0    */
  86.                                 0xA260,        /* _FSDispatch,Immed     */
  87.                                 0x6004,        /* BRA.S      *+$0006    */
  88.                                 0x7044,        /* MOVEQ      #$44,D0    */
  89.                                 0xA660,        /* _FSDispatch,Sys,Immed */
  90.                                 0x3E80};    /* MOVE.W     D0,(A7)    */
  91.  
  92. #pragma parameter __D0 PBGetUGEntrySync(__A0)
  93. pascal OSErr PBGetUGEntrySync(HParmBlkPtr paramBlock) = {
  94.                                 0x7044,        /* MOVEQ      #$44,D0    */
  95.                                 0xA260};    /* _FSDispatch,Immed     */
  96.  
  97. #pragma parameter __D0 PBGetUGEntryAsync(__A0)
  98. pascal OSErr PBGetUGEntryAsync(HParmBlkPtr paramBlock) = {
  99.                                 0x7044,        /* MOVEQ      #$44,D0    */
  100.                                 0xA660};    /* _FSDispatch,Sys,Immed */
  101.  
  102. #if PRAGMA_ALIGN_SUPPORTED
  103. #pragma options align=reset
  104. #endif
  105.  
  106. #ifdef __cplusplus
  107. }
  108. #endif
  109.  
  110. #endif    /* __SHARING__ */
  111.